package main

import (
	"gitee.com/kinwyb/appTools/appTool"
	"gitee.com/kinwyb/appTools/examples/src/rpc/serverRpcSev"
	"gitee.com/kinwyb/appTools/log"
)

const appName = "examples"

var app = appTool.NewApplication(appName)

func main() {
	app.FlagParseRpcxServerAddr()
	err := app.PrepareFunc(appPrepare).
		EnableApollo("common", "127.0.0.1:30071").
		SetRpcxServer(&serverRpcSev.RpcxServiceGroup{}).
		SetRpcxServerAddr("tcp@127.0.0.1:10001").
		Run() //启动
	if err != nil {
		log.AppTool.Fatalf("运行结束:%s", err.Error())
	}
}

func appPrepare(app *appTool.Application) {
	log.AppTool.Debug("程序初始化")
}
